#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;


typedef void (*FUN_POINT) ();

class A
{
	virtual void func1()
	{
		cout << "A::func1";
	}
};

class C
{
	virtual void func1()
	{
		cout << "C::func1";
	}
};


class B : public A , public C
{
	virtual void func1()
	{
		cout << "B::func1";
	}
	virtual void func2()
	{
		cout << "A::func2";
	}

};

void PrintTable(FUN_POINT* table)
{
	for (size_t i = 0; table[i] != nullptr; ++i)
	{
		printf("[%d]->%p->", i, table[i]);
		FUN_POINT func = table[i];
		func();
		printf("\n");

	}

}


int main()
{
	B b;
	C* ptr = &b;
	int ref = *((int*)&b);
	PrintTable((FUN_POINT*)ref);
	ref = *(int*)ptr;
	PrintTable((FUN_POINT*)ref);

	return 0;
}